<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>盒子模型</title>
    <style>
        /* 全局样式 */
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            text-align: center;
        }

     
        

        /* 导航栏 */
        .nav-bar {
            display: flex;
            justify-content: center;
            border-top: 2px solid orange;
            border-bottom: 1px solid lightgray;
            margin: 20px 0;
        }

        .nav-item {
            padding: 10px 20px;
            font-size: 16px;
            color: black;
            text-decoration: none;
        }

        .nav-item.active {
            background-color: #ddd;
            font-weight: bold;
        }

        .nav-item:hover {
            background-color: #f0f0f0;
        }

        /* 下划线 */
        .underline {
            border-bottom: 2px solid orange;
            width: 100%;
            margin-top: -2px;
        }
    </style>
</head>
<body>
  

    <!-- 导航栏 -->
    <div class="nav-bar">
        <a href="#" class="nav-item">首页</a>
        <a href="#" class="nav-item">手机新浪网</a>
        <a href="#" class="nav-item">移动客户端</a>
        <a href="#" class="nav-item active">博客</a>
        <a href="#" class="nav-item">微博</a>
        <a href="#" class="nav-item">关注我</a>
    </div>

</body>
</html>
